package com.itheima.shoppingmall;

/**
 * 订单类
 */
public class Order {
    private Goods goods;//所购商品对象
    private int amount;//所购商品数量
    private  double transactionMoney;//订单交易总额
    private boolean isPay;//支付状态  是否支付

    public Order() {
    }

    public Order(int amount, double transactionMoney, boolean isPay) {
        this.amount = amount;
        this.transactionMoney = transactionMoney;
        this.isPay = isPay;
    }

    public Order(Goods goods, int amount, double transactionMoney,boolean isPay) {
        this.goods = goods;
        this.amount = amount;
        this.transactionMoney = transactionMoney;
        this.isPay = isPay;
    }

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }

    public double getTransactionMoney() {
        return transactionMoney;
    }

    public void setTransactionMoney(double transactionMoney) {
        this.transactionMoney = transactionMoney;
    }

    public boolean getIsPay() {
        return isPay;
    }

    public void setIsPay(boolean isPay) {
        this.isPay = isPay;
    }

    @Override
    public String toString() {
        return "Order{" +
                "goods=" + goods +
                ", amount=" + amount +
                ", transactionMoney=" + transactionMoney +
                ", isPay=" + isPay +
                '}';
    }
}
